﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Ivory
{
    public sealed class SplashScreen : SplashScreenBase
    {
        //Fields
        private Texture2D splashTexture;
        private string textureString;

        //Construct
        public SplashScreen(Game game, string splashTexture, Color fadeColor, float life)
            : base(game, life)
        {
            this.textureString = splashTexture;
        }

        //Methods
        public override void RenderSplash(SpriteBatch batch, GameTime time)
        {
            batch.Begin();
            batch.Draw(splashTexture, Manager.WindowRect, Color.White); 
            batch.End();
        }

        public override void UpdateSplash(GameTime time)
        {

        }

        public override void LoadAssets()
        {
            splashTexture = Load<Texture2D>(textureString);
        }
    }
}
